package object

import (
	"gddgame.cc/galaxy/common/dsl/game"
)

const providerName = "object"

func init() {
	_ = game.RegisterGlobalModule(game.ModuleProvider{
		Name:    providerName,
		Depends: []string{"base", "stat", "group"},

		OnInit: func(env *game.Environment) error {
			var err error
			if _, err = env.RegisterModel(SettingObjectModelName, &SettingObjectModel{}); err != nil {
				return err
			}
			if _, err = env.RegisterModel(SettingObjectName, &SettingObject{}); err != nil {
				return err
			}
			return nil
		},
	})
}
